#ifndef __gui_button__h__
#define __gui_button__h__

#include "hge.h"
#include "hgegui.h"
#include "hgesprite.h"

typedef int GUI_STATE;

enum
{
	GUI_NORMAL = 0,
	GUI_MOUSE_MOVE   = 1,
	GUI_MOUSE_LEAVE  = 2,
	GUI_BUTTON_DOWN  = 3,
	GUI_BUTTON_UP    = 4
};

class gui_button : public hgeGUIObject
{
public:
	gui_button(int guid, char* texfile, int _x, int _y, int width, int height);
	~gui_button();

	//void Update(float dt){}
	//void Enter(){}
	//void Leave(){}
	//bool IsDone(){return true;}
	//void Focus(bool bFocused){}
	//bool KeyClick(int key, int chr){return false;}

	void Render();
	void MouseOver(bool bOver);
	bool MouseLButton(bool bDown);

	GUI_STATE GetState();
	void SetState(GUI_STATE s);
	void SetLock(bool b);
	bool GetIsLock();

private:
	int x;
	int y;
	bool down;
	bool lock;
	GUI_STATE state;
	hgeSprite* sprite;
	hgeSprite* lock_sprite;
};
#endif